<template>
	<view>
	<view :class="['act-modal', item.show?'show':'']" v-if="index==0&&item.show" v-for="(item,index) in new_act_modal_list" :key="item.id">
		<view @tap="$emit('closeActModal',$event)" class="act-modal-bg"></view>
		<view class="act-modal-pic flex-y-center flex-x-center">
			<view class="text-center w-100">
				<swiper autoplay="true" circular="true" class="banner w-100" :current="index" duration="300" :indicatorDots="item.list.length==1?'false':'true'"
				 interval="5000" style="height:700upx;">
					<swiper-item v-for="(value,key) in item.list" :key="value.id">
						<form @submit="$emit('_formIdSubmit',$event)" :data-appId="value.appId" data-bind="closeActModal" :data-path="value.path"
						 :data-type="value.open_type" :data-url="value.url" reportSubmit="true">
							<button formType="submit" id="_formIdSubmit" class="_formIdSubmit">
								<image mode="aspectFit" :src="value.pic_url" :style="{width: value.new_pic_width,height: value.new_pic_height}"></image>
							</button>
						</form>
					</swiper-item>
				</swiper>
				<view @tap="$emit('closeActModal',$event)" class="act-modal-close flex-x-center">
					<image :src="__wxapp_img.dapp.close4.url"></image>
				</view>
			</view>
		</view>
	</view>
	</view>
</template>

<script>var myVue = {};
	export default {
		props: ['__wxapp_img','act_modal_list'],
		computed:{
			new_act_modal_list() {
					var arr = this.act_modal_list
					arr.forEach(function(element){
						element.list.forEach(function(e){
							e.new_pic_width = uni.upx2px(e.pic_width) + 'px';
							e.new_pic_height = uni.upx2px(e.pic_height) + 'px';
						})
					})
					return arr;
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>
	
<style scoped>
</style>
